package com.cqjtu.store.system.service.impl;


import com.cqjtu.store.system.mapper.ViewCntMapper;
import com.cqjtu.store.system.pojo.vo.FavoriteTopVo;
import com.cqjtu.store.system.pojo.vo.ViewCntProductVo;
import com.cqjtu.store.system.service.ViewCntService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ProjectName: cqjtu-store
 * @Titile: ViewCntServiceImpl
 * @Author: Lucky
 * @Description: 商品业务层
 */
@Service
public class ViewCntServiceImpl implements ViewCntService {
    @Autowired
    ViewCntMapper viewCntMapper;

    @Override
    public List<ViewCntProductVo> getProductCntList() {
        List<ViewCntProductVo> obj = viewCntMapper.loadProductCnt();
        return obj;
    }

    @Override
    public List<FavoriteTopVo> getFavoriteTopList() {
        List<FavoriteTopVo> obj = viewCntMapper.loadFavoriteCnt();
        return obj;
    }

    @Override
    public Integer getOrderCnt() {

        return  viewCntMapper.getOrderCnt();
    }

    @Override
    public Integer getOrderToday() {
        return  viewCntMapper.getOrderToday();

    }

    @Override
    public Integer getOrderTotal() {
        return  viewCntMapper.getOrderTotal();
    }

    @Override
    public Integer getProductTotal() {
        return  viewCntMapper.getProductTotal();
    }
}
